package com.imohoo.testre;

import com.imohoo.libs.retrofit2.converter.*;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Url;

import java.util.HashMap;

/**
 * Created by zhaobo on 2017/1/3.
 */

public interface ShanpaoService {

    String UPLOAD_PHP = "upload.php";

    /**
     * @param params
     * @return
     */
    @POST("/")
    Call<SpResponse<HashMap>> listZan1(@Body SpRequest params);

    @POST("/")
    @CMD("SnsApi")
    @OPT("getUserHitsList")
    Call<SpResponse<HashMap>> listZan2(@Body SpRequest params);

    @GET
    Call<ResponseBody> download(@Url String fileUrl);

    @POST(UPLOAD_PHP)
    Call<SpUploadResponse> upload(@Body SpUploadRequest uploadRequest);

    @POST("uploadVideo.php")
    Call<FileUploadResponse> uploadFile2(@Body SpFile typedFile);
}